package com.xc.freeapp.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;

/**
 * Created by Administrator on 2016/8/8.
 */
@Controller
@RequestMapping("/api/test")
@Api("测试接口")
@Slf4j
public class TestController {

    @RequestMapping(value= "demo",method = RequestMethod.GET)
    @ApiOperation(value = "查询列表")
    @ResponseBody
    public ApiInfo home() {
        log.info("开始");


        ApiInfo apiInfo = new ApiInfo("Electronic Health Record(EHR) Platform API",//大标题
                "EHR Platform's REST API, for system administrator",//小标题
                "1.0",//版本
                "NO terms of service",
                new Contact("550187704@qq.com","www.diyuapp.com","550187704@qq.com"),
                "The Apache License, Version 2.0",//链接显示文字
                "http://www.apache.org/licenses/LICENSE-2.0.html"//网站链接
        );
        return apiInfo;
    }
}
